<template>
  <div>
    我是子组件
    {{ n }}
    <button @click="AddNum">属性事件修改</button>
    <button @click="AddNum1">自定义事件修改</button>
   
  </div>
</template>

<script>
export default {
  props: ["n","update"],
  methods:{
    AddNum(){
        this.update();
    },
    AddNum1(){
      this.$emit("abc")  
    }
 
  }
};
</script>

<style></style>
